import turtle


def ignore_terminator_exception(func):
    def wrapper(*args, **kwargs):
        try:
            result = func(*args, **kwargs)
            print("绘画窗口关闭")
        except turtle.Terminator as e:
            result = None
            print("绘画终止")

        return result

    return wrapper